<?

function insert_table($table="",$data="")
{
$field=(implode(",", array_keys($data)));
$isi_field=(implode("','",$data));
$sql = "INSERT INTO $table ($field) VALUES ('$isi_field');";
$result = mysql_query($sql);

}
function update_table($sql="")
{
$result = mysql_query($sql);
}
function delete_table($table="",$kode_index="",$kode="")
{
$sql = "update $table set status_delete='1' where $kode_index='$kode';";
$result = mysql_query($sql);
return  $result;
}
function select_table($table="", $where="", $kode_index="" ,$kode="")
{
if ($where != "") {
	$where="where $kode_index='$kode'";
}
$sql_select="select * from $table $where";
$result = mysql_query($sql_select);


return $result;

}

?>